package oj_hihocode;

import java.util.Scanner;

/**
 * Created by zhangyi on 2017/7/25.
 */
public class T1091 {
    private static int N;
    private static int[] A;
    private static int[] B;

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        N = scanner.nextInt();
        int M = scanner.nextInt();
        A = new int[N];
        B = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = scanner.nextInt();
            B[i] = scanner.nextInt();
        }


    }

    private static int findMaxDamage(int coins) {
        int max = 0;
        for (int i = 0; i < N; i++) {
            if (coins >= B[i]){
                max = Math.max(max, findMaxDamage(coins - B[i]));
            }
        }
        return max;
    }
}
